package com.sss.hloster0308;

public class HourlyEmployee extends ColaEmployee {
	private float HourSalary;// 每小时的工资
	private float HourNum;// 每个月工作的小时数

	public HourlyEmployee() {
		super();
	}

	Company c = new Company();

	public HourlyEmployee(String name,int birthday,float hourSalary, float hourNum ) {
		super(name, birthday);
		HourSalary = hourSalary;
		HourNum = hourNum;
	}

	public int getSalary(int month) {
		if(HourNum<=160) {
			double salary =HourSalary*HourNum+super.getSalary(month);
			c.print(name,salary,month);
			return 0;
		}else {
			double salary =(HourSalary-160)*HourNum*1.5+160*HourNum+super.getSalary(month);
	         c.print(name,salary,month);
	         return 0;
		}
	}
}